package com.his.api.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.his.api.service.UserService;
import com.his.dao.domain.dto.ListDto;
import com.his.dao.domain.dto.UserAllIdDto;
import com.his.dao.domain.entity.User;
import com.his.dao.domain.vo.ListVo;
import com.his.dao.domain.vo.LoginVo;
import com.his.dao.mapper.UserMapper;
import com.his.util.constant.RedisConstant;
import com.his.util.result.RestResult;
import com.his.util.result.RestResultBuilder;
import com.his.util.result.ResultCode;
import com.his.util.util.IpUtil;
import com.his.util.util.MapUtil;
import com.his.util.util.StringUtil;
import com.his.util.util.TokenUtil;
import lombok.AllArgsConstructor;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import java.time.LocalDateTime;
import java.util.LinkedHashMap;
import java.util.concurrent.TimeUnit;

import static com.his.util.constant.RedisConstant.*;

@Service
@AllArgsConstructor
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    private UserMapper userMapper;

    @Override
    public RestResult allId(UserAllIdDto userAllIdDto) {
        return new RestResultBuilder().success(userMapper.allId(
                userAllIdDto.getDate(),
                userAllIdDto.getName(),
                userAllIdDto.getSectionId()
        ));
    }
}
